<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=<device-width>, initial-scale=1.0">
    <title>Document</title>
    <style>
        .transitionbox{
            width: 100px;
            height: 100px;
            background-color: red;
             /*横向拉伸效果,执行时间2s*/
             transition:  2s;
             
        }

        /*鼠标移入div触发动画执行*/
        .transitionbox:hover{
            width: 300px;/*拉伸宽度从100到300*/
            height: 300px;
        }
    </style>
</head>
<body>
    <h3>拉伸盒子动画效果</h3>
    <h5>transition它有两个参数:拉伸方向width，2s动画执行时间</h5>
    
    <div class="transitionbox"></div>
</body>
</html>